<!DOCTYPE html>
<!--suppress JSUnresolvedLibraryURL -->
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>项目开发辅助工具1</title>
    <script src="http://h.static.2shou91.com/js/jquery.min.js"></script>
    <script src="http://h.static.2shou91.com/js/jquery.cookie.js"></script>
    <script src="http://h.static.2shou91.com/js/plugins/layer/layer.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body>
<div class="container-fluid center-block" style="width: 50%;padding-top: 10px">
    <form class="form-horizontal col-xs-11" id="testConnectionForm">
        <div class="form-group">
            <label for="agreement" class="col-sm-3 control-label">数据库协议</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="agreement" name="agreement" placeholder="jdbc" data-prompt="数据库协议,暂时该功能只支持jdbc协议" value="jdbc">
            </div>
        </div>
        <div class="form-group">
            <label for="dataBase" class="col-sm-3 control-label">数据库</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="dataBase" name="dataBase" placeholder="mysql或其他,暂时只支持mysql" data-prompt="mysql或其他,暂时只支持mysql" value="mysql">
            </div>
        </div>
        <div class="form-group">
            <label for="ip" class="col-sm-3 control-label">ip或者域名</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="ip" name="ip" placeholder="ip或者域名" data-prompt="ip地址或者域名" value="db.zhangfusheng.cn">
            </div>
        </div>
        <div class="form-group">
            <label for="port" class="col-sm-3 control-label">端口号</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="port" name="port" placeholder="端口" data-prompt="端口号" value="3306">
            </div>
        </div>
        <div class="form-group">
            <label for="param" class="col-sm-3 control-label">param</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="param" name="param" placeholder="useUnicode=true&amp;characterEncoding=UTF-8&useSSL=false" data-prompt='useUnicode=true&amp;characterEncoding=UTF-8&useSSL=false' value="useUnicode=true&amp;characterEncoding=UTF-8&useSSL=false">
            </div>
        </div>
        <div class="form-group">
            <label for="tableSchema" class="col-sm-3 control-label">tableSchema</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="tableSchema" name="tableSchema" placeholder="tableSchema 数据库名称" data-prompt="数据库名称">
            </div>
        </div>
        <div class="form-group">
            <label for="username" class="col-sm-3 control-label">username</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="username" name="username" placeholder="username" data-prompt="用户名" value="root">
            </div>
        </div>
        <div class="form-group">
            <label for="password" class="col-sm-3 control-label">password</label>
            <div class="col-sm-7">
                <input type="password" class="form-control" id="password" name="password" placeholder="password" data-prompt="密码" value="zfs199528">
            </div>
        </div>
        <div class="form-group">
            <label for="driverClassName" class="col-sm-3 control-label">driverClassName</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="driverClassName" name="driverClassName" placeholder="driverClassName" value="com.mysql.jdbc.Driver">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-7">
                <button type="button" id="testConnection" class="btn btn-default">测试连接</button>
                <label id="testMsg"></label>
            </div>
        </div>
    </form>
    <form class="form-horizontal col-xs-11" id="createModelForm" method="post" action="/createModel" onkeydown="if(event.keyCode==13){return false;}">
        <div class="form-group">
            <label class="col-sm-3 control-label">是否指定表</label>
            <div class="col-sm-3">
                <label class="radio-inline">
                    <input type="radio" name="specifiedTable" id="specifiedTable1" value="true"> true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="specifiedTable" id="specifiedTable2" value="false" checked="checked"> false
                </label>
            </div>
            <div class="col-sm-6">
                <div id="tableMsg">*注意:将对数据库中的所有表生成对象</div>
            </div>
        </div>
        <div class="form-group" id="search">
            <label class="col-sm-3 control-label">搜索表名</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" name="tableName" id="tableName" placeholder="Search">
            </div>
        </div>
        <div class="form-group" id="table">
            <label class="col-sm-3 control-label">指定哪些表</label>
            <div class="col-sm-7" id="tableNames"></div>
            <div class="col-sm-10 pull-right" style="width:35px">
                <div class="col-sm-3">
                    <button class="btn btn-default" onclick="checkOut('tableNames')" type="button">反选</button>
                </div>
                <div class="col-sm-9">
                    <ul class="pagination" id="page">
                    </ul>
                </div>

            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否需要创建model包结构</label>
            <div class="col-sm-7">
                <label class="radio-inline">
                    <input type="radio" name="mkdirPackagePath" id="package1" value="true" onclick="packageFn(true)"> true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="mkdirPackagePath" id="package2" value="false" checked="checked" onclick="packageFn(false)"> false
                </label>
            </div>
        </div>
        <div class="form-group" id="packageDiv">
            <label class="col-sm-3 control-label" for="package">包路径</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" name="pagePath" id="package" placeholder="包名采用'.'的方式拼接" value="com.zfs.spring.model">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否使用包装类型</label>
            <div class="col-sm-3">
                <label class="radio-inline">
                    <input type="radio" name="encapsulation" id="encapsulation1" value="true"> true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="encapsulation" id="encapsulation2" value="false" checked="checked"> false
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">get set 方法生成</label>
            <div class="col-sm-3">
                <label class="radio-inline">
                    <input type="radio" name="getAndSet" id="getAndSet1" value="true" checked="checked"> true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="getAndSet" id="getAndSet2" value="false"> false
                </label>
            </div>
        </div>
        <div class="form-group" id="lombok">
            <label class="col-sm-3 control-label">是否使用 lombok插件</label>
            <div class="col-sm-7">
                <label class="radio-inline">
                    <input type="radio" name="lombok" id="lombok1" value="true"> true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="lombok" id="lombok2" value="false" checked="checked"> false
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" for="zipName">包名</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="zipName" name="zipName" placeholder="压缩包名称" value="demo.zip">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">注释方式</label>
            <div class="col-sm-7">
                <label class="radio-inline">
                    <input type="radio" name="notesNum" id="notesNum1" value="3" checked="checked"> 文本注释
                </label>
                <label class="radio-inline">
                    <input type="radio" name="notesNum" id="notesNum2" value="2"> 多行注释
                </label>
                <label class="radio-inline">
                    <input type="radio" name="notesNum" id="notesNum3" value="1"> 单行注释
                </label>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" for="connector">数据库表名和字段名的连接符</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="connector" name="connector" placeholder="数据库表名和字段名的连接符" value="_">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-7">
                <button type="submit" class="btn btn-default">创建Model</button>
            </div>
        </div>
    </form>
    <form class="form-horizontal col-xs-11" id="createDaoForm" method="post" action="/createDao"
          onkeydown="if(event.keyCode==13){return false;}">
        <input hidden id="tableNamesBak" name="tableNames">
        <div class="form-group">
            <label class="col-sm-3 control-label">是否需要创建Dao包结构</label>
            <div class="col-sm-7">
                <label class="radio-inline">
                    <input type="radio" name="createDaoPackagePath" value="true" onclick="daoPackagePathCreate(true)">
                    true
                </label>
                <label class="radio-inline">
                    <input type="radio" name="createDaoPackagePath" value="false" checked="checked"
                           onclick="daoPackagePathCreate(false)"> false
                </label>
            </div>
        </div>
        <div class="form-group" id="daoPackageDiv">
            <label class="col-sm-3 control-label" for="package">Dao包路径</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" name="daoPackagePath" id="daoPackage" placeholder="包名采用'.'的方式拼接"
                       value="com.zfs.spring.model">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" for="daoSuffix">dao层后缀名</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="daoSuffix" name="daoSuffix" placeholder="dao层后缀名" value="DAO">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label" for="daoPrefix">dao层前缀名</label>
            <div class="col-sm-7">
                <input type="text" class="form-control" id="daoPrefix" name="daoPrefix" placeholder="dao层前缀名" value="Tb">
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-7">
                <button type="submit" class="btn btn-default">创建Dao</button>
            </div>
        </div>
    </form>
</div>
</body>
<script src="../static/index.js"></script>
</html>